<script lang="ts" setup>
const queryParams = reactive({
  name: '',
  carType: '',
  subject: ''
})
const handleQuery = () => {}

const columns = [
  {
    field: 'name',
    label: '题集名称'
  },
  {
    field: 'description',
    label: '题集描述'
  },
  {
    field: 'carType',
    label: '车型'
  },
  {
    field: 'subject',
    label: '科目'
  },
  {
    field: 'actions',
    label: '操作'
  }
]

const data = [
  {
    name: '科目一',
    description: '学习科目一',
    carType: '小型车',
    subject: '科目一'
  }
]
</script>

<template>
  <ContentWrap>
    <!-- 搜索工作栏 -->
    <el-form
      class="-mb-15px"
      :model="queryParams"
      ref="queryFormRef"
      :inline="true"
      label-width="68px"
    >
      <el-form-item label="课程名称" prop="courseName">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入题集名称"
          clearable
          @keyup.enter="handleQuery"
          class="!w-240px"
        />
      </el-form-item>
    </el-form>
  </ContentWrap>

  <!-- 列表 -->
  <ContentWrap>
    <Table :columns="columns" :data="data">
      <template #actions>
        <el-button link type="primary">编辑</el-button>
        <el-button link type="danger">删除</el-button>
      </template>
    </Table>
  </ContentWrap>
</template>
